package com.massfords.jaxb;

import java.util.Set;

import com.sun.codemodel.JDefinedClass;
import com.sun.codemodel.JMod;
import com.sun.codemodel.JPackage;
import com.sun.tools.xjc.outline.ClassOutline;
import com.sun.tools.xjc.outline.Outline;

public class CreateTraversingVisitorProgressMonitorInterface extends CodeCreator {

    private JDefinedClass mVisitable;

    public CreateTraversingVisitorProgressMonitorInterface(JDefinedClass aVisitable, Outline aOutline, JPackage aPackage) {
        super(aOutline, aPackage);
        mVisitable = aVisitable;
    }

    @Override
    protected void run(Set<ClassOutline> aClasses) {
        setOutput( mOutline.getClassFactory().createInterface(mPackage, "TraversingVisitorProgressMonitor", null) );
        getOutput().method(JMod.PUBLIC, void.class, "visited").param(mVisitable, "aVisitable");
        getOutput().method(JMod.PUBLIC, void.class, "traversed").param(mVisitable, "aVisitable");
    }

}
